package org.jackysoft.mapper;

import java.util.Collection;

import org.apache.ibatis.annotations.Param;
import org.jackysoft.data.MapperDataProvider;
import org.jackysoft.entity.TreeNode;

public interface TreeNodeMapper extends MapperDataProvider<TreeNode> {
     Collection<TreeNode> findFromRoot();
     Collection<TreeNode> findByParent(@Param("parentId")String parentId);
     Collection<TreeNode> findEnabledByParent(@Param("parentId")String parengId);
     Collection<TreeNode> findByParentForSecurityRole(@Param("parentId")String parentId,@Param("role")String role);
     Collection<TreeNode> findByParentForSecurityRoleAndContext(@Param("parentId")String parentId,@Param("role")String role,@Param("contextType")int ctype );
     Collection<TreeNode> findByParentForUser(@Param("parentId")String parentId,@Param("roles")String roles);
     Collection<TreeNode> findAllForSecurityRoles(@Param("roles")String roles);
     Collection<TreeNode> findAllForSecurityRole(@Param("role")String role);
          
}
